import React, { PureComponent } from 'react';
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import './index.less'

class FileDataMenu extends PureComponent {

  static propTypes = {
    fileDataMenu: PropTypes.object
  }

  render () {
    const { fileDataMenu } = this.props
    return (
      <ul className="fileDataMenu" style={{ display: fileDataMenu.visible? 'block': 'none', left: fileDataMenu.x, top: fileDataMenu.y }}>
        <li>
          打开
        </li>
        <li>
          <i className="iconfont icon-download" />
          下载
        </li>
        <li>
          <i className="iconfont icon-share" />
          分享
        </li>
        <li>
          <i className="iconfont icon-enjoy-together" />
          共享
        </li>
        <li>
          <i className="iconfont icon-copy" />
          复制
        </li>
        <li>
          <i className="iconfont icon-move" />
          移动
        </li>
        <li>
          <i className="iconfont icon-rename" />
          重命名
        </li>
        <li>
          <i className="iconfont icon-delete" />
          删除
        </li>
      </ul>
    );
  }
}

export default connect(
  (state) => ({
    fileDataMenu: state.fileDataMenu
  })
)(FileDataMenu);
